package iO;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

/**
 * @Author: Miyako
 * @Date: 2024-07-16-16:33
 * @Description: 序列化对象
 */
public class ObjectOutputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        Message m = new Message(10086,"NI","ee");
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("Message.txt"));
        oos.writeObject(m);
        oos.close();


    }
}
